#pragma once

#include "Movie.h"
#include "MemberDetails.h"
#include "Member.h"
//#include <mysql_driver.h>
//#include <cppconn\connection.h>
//#include <cppconn/resultset.h>
//#include <cppconn/statement.h>
//#include <cppconn/prepared_statement.h>

//using namespace sql;
//using namespace mysql;

class DataBaseManager
{
	//MySQL_Driver *driver;
	//Connection *conn;
	//Statement *stmt;
	
	//vector<Rental> _rentals;
	//vector<Reservation> _reservations;
	vector<Member> _members;
	vector<Movie> _movies;
public:
	DataBaseManager(void);
	void connect();
	void close();
	bool checkPassword(string password_);
	void editPassword(string newPassword_);
	void reserveFilm(int movieID_, int id_);
	void cancelResevedMovie(int movieID_);
	vector<Member> getReservers(int moviesID_);
	vector<Member> getRenters(int dvdsID_);
	//vector<Movie> getMyReservations(int memberID_);
	//vector<DVD> getMyRentals(int memberID_);
	void addAccount(MemberDetails details_);
	MemberDetails searchMemberDetails(string userName_);
	void addDVD(int movieID_, string barcode_);
	void removeDVD(int movieID_, string barcode_);
	void addFilm(Movie movie_);
	//void rentFilm(Rental operation_);
	//void endRentFilm(Rental operation_);
	vector<Movie> searchFilm(string movieName_);
	vector<Movie> filter(string type_);
	vector<Member> getAllMembers();
	Member getMember(string userName_);
	Member getMember(int memberID_);
	vector<Movie> getAllMovies();
	Movie getMovie(int movieID_);
	~DataBaseManager(void);
};

